{extend name="$_tpl_public_layout_danceadmin"/}


{block name="breadcrumb"}
<ol class="breadcrumb">
	<li class="breadcrumb-item"><a href="{:url('admin/index/index')}">{:config('system.site_title')}</a></li>
	<li class="breadcrumb-item"><a href="{:url('mobmall_manage/article/index')}">{$sideName}</a></li>
</ol>
{/block}


{block name="pageheader"}
{$sideName}
{/block}


{block name="content"}
<div class="card">
	<div class="card-body">
		<form action="{:url('mobmall_manage/article/doAdd')}" method="post" enctype="multipart/form-data" class="form-horizontal J_ajaxForm">
			<input type="hidden" name="id" value="{$id}" />
			{if condition="$id"}
			<div class="form-group row">
				<label class="col-sm-2 control-label">添加时间</label>
				<div class="col-sm-5">
					<input type="text" name="data[create_time]" value="{$info['create_time_show']}" class="form-control J_datetimepicker">
				</div>
				<div class="col-sm-5"></div>
			</div>
			{/if}
			<div class="form-group row">
				<label class="col-sm-2 control-label">标题</label>
				<div class="col-sm-5">
					<input type="text" name="data[title]" value="{$info.title}" class="form-control" />
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">分类</label>
				<div class="col-sm-10">
					<?php echo optionRadioHtmlB($categoryList, 'data[cid]', $info['cid'], 'name', 'id'); ?>
				</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">图片</label>
				<div class="col-sm-5">
					<div class="upload-control">
						<input type="file" name="picurl" class="J_uploadfile" />
					</div>
					<div class="upload-show J_preview">
						<img src="{$info['picurl']}" class="upload-img-sm" onerror="Javascript:this.src='/static/danceAdmin/images/nopic.png';" />
					</div>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">图片2</label>
				<div class="col-sm-5">
					<div class="upload-control">
						<input type="file" name="picurl2" class="J_uploadfile" />
					</div>
					<div class="upload-show J_preview">
						<img src="{$info['picurl2']}" class="upload-img-sm" onerror="Javascript:this.src='/static/danceAdmin/images/nopic.png';" />
					</div>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">图片3</label>
				<div class="col-sm-5">
					<div class="upload-control">
						<input type="file" name="picurl3" class="J_uploadfile" />
					</div>
					<div class="upload-show J_preview">
						<img src="{$info['picurl3']}" class="upload-img-sm" onerror="Javascript:this.src='/static/danceAdmin/images/nopic.png';" />
					</div>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">视频</label>
				<div class="col-sm-5">
					<div class="upload-control">
						<input type="file" name="videourl" class="J_uploadfile" />
					</div>
					<div class="upload-show J_preview">
						<img src="{$info['videourl']}" class="upload-img-sm" onerror="Javascript:this.src='/static/danceAdmin/images/nopic.png';" />
					</div>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">描述</label>
				<div class="col-sm-10">
					<script id="container" name="data[content]" type="text/plain">{$info['content']}</script>
				</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">状态</label>
				<div class="col-sm-10">
					<?php echo isOpenRadioHtmlB('data[status]', $info['status']); ?>
				</div>
			</div>
			<div class="clearfix form-actions">
				<div class="offset-md-2 col-sm-10">
					<button type="submit" class="btn btn-primary btn-sm J_ajaxSubmit">保存修改</button>
				</div>
			</div>
		</form>
	</div>
</div>
{/block}


{block name="script"}
<!-- 上传图片展示 -->
<script type="text/javascript" src="__STATIC__/dancewidgets/uploadPreview/uploadPreview.js"></script>

<!--时间选择器-->
{include file="./themes/public/script_datetimepicker.html" /}

<!-- 实例化编辑器 -->
<script type="text/javascript" src="__STATIC__/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
var ue = UE.getEditor('container', {
	initialFrameWidth: '100%',
	initialFrameHeight: 160,
	autoHeightEnabled: true,
	autoFloatEnabled: true,
	elementPathEnabled: false,
});
</script>
{/block}